<?php

namespace App\Http\Controllers;



use App\Models\Category;
use App\Models\Traits\ActiveUserCounter;
use App\Models\User;
use Carbon\Carbon;

class RootController extends Controller {
use ActiveUserCounter;

    public function root() {
        $categories = Category::all();
        return view('pages.root',compact('categories'));
    }

    public function permissionDenied(){
        if(config('administrator.permission')()){
            return redirect(url(config('administrator.uri')),302);
        }
        return view('pages.permission-denied');
    }

}
